/*********************************************************
          File Name:9.13.cpp
          Author: Abby Cin
          Mail: abbytsing@gmail.com
          Created Time: Wed 17 Feb 2016 10:02:11 PM CST
**********************************************************/

#include <iostream>
#include <vector>
#include <list>

// how to initialize vector<double> with list<int> or vector<int>?

int main()
{
    using namespace std;
    list<int> l{1, 2, 3};
    vector<int> v{1, 2, 3};
    vector<double> res1(l.cbegin(), l.cend());
    vector<double> res2(v.cbegin(), v.cend());

    for(const auto &x: res1)
        cout << x - 0.5 << " ";
    cout << endl;
    for(const auto &x: res2)
        cout << x - 0.5 << " ";
    cout << endl;

    return 0;
}
